<?php

$con=mysqli_connect("localhost","root","admin","HOPEWw");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$sql="INSERT INTO ECD (ECD_name,ECD_Location, ECD_manager_name, ECD_Contact)
VALUES
('$_POST[ECDName]','$_POST[ECDLocation]','$_POST[ECDManager]','$_POST[ECDContact]')";

if (!mysqli_query($con,$sql))
  {
  die('Error: ' . mysqli_error($con));
  }
echo "new ECD added";

mysqli_close($con);
?>
